package com.chum.chamber.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.ExceptionHandler;

import com.chum.chamber.dao.RegistryDAO;
import com.chum.chamber.model.Registry;

@Service
public class RegistryServiceImpl implements RegistryService {

	@Autowired
	private RegistryDAO registryDAO;
	
	@Override
	@Transactional
	@ExceptionHandler
	public boolean saveRegistry(Registry registry) {
		boolean saved = false;
		try {
			saved = registryDAO.saveRegistry(registry);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return saved;
	}

}
